package com.bitejiuyeke.job_publish.dao;

import com.bitejiuyeke.job_publish.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {
    int insert(User row);

    int insertSelective(User row);

    User selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(User row);

    int updateByPrimaryKey(User row);

    /**
     * 根据电话号码查询
     * @param phoneNum 电话号码
     * @return User
     */
    User selectByPhoneNum(@Param("phoneNum") String phoneNum);

    /**
     * 根据电子邮箱市教育局
     * @param email 电子邮箱
     * @return User
     */
    User selectByEmail(@Param("email") String email);

    /**
     * 根据姓名查询
     * @param name 姓名
     * @return User
     */
    User selectByName(@Param("name") String name);

    /**
     * 用户总数
     * @param record
     * @return
     */
    int totalCount (User record);

    /**
     * 用户分页列表
     * @param record
     * @return
     */
    List<User> selectByPage(User record);
}